<html>
<head>
    <meta charset="UTF-8">
    <title>户学教育</title>
    <meta name="keywords" content="户学教育">
    <meta name="Description" content="户学教育"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,  user-scalable=0"/>
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/idangerous.swiper.css?t={time()}">
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/common.css?t={time()}">
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/custom.css?t={time()}"/>
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/public_class.css?t={time()}"/>
    <script type="text/javascript" src="{HOME_THEME_PATH}../gw/js/le_include_head.js?t={time()}"></script>

    <link rel="icon" href="{HOME_THEME_PATH}../gw/img/f-logo.png" type="image/png" sizes="16x16">


    <link rel="stylesheet" href="//g.alicdn.com/de/prismplayer/2.6.0/skins/default/aliplayer-min.css" />
    <script type="text/javascript" src="//g.alicdn.com/de/prismplayer/2.6.0/aliplayer-min.js"></script>

    <script name="baidu-koubei-verification" src="//ikoubei.baidu.com/embed/58ea9664cf897d52f78ec69fff1379d6"></script>
</head>
<body class="le-public-class">
    <div class="main">
        <!-- 头部 -->
        {template "../gw/common.html"}
        <!-- 头部banner -->
        <div class="part part1">
            <div class="swiper-container homeBanner">
                <div class="swiper-wrapper">

                    {if count($banners)>0}
                        {loop $banners $banner}
                            {if $banner['skip'] == 1}
                                <div class="swiper-slide" >
                                    <a class="">
                                        <img
                                                src="{$banner['cover']}"
                                                poupform ="yes"
                                                maintitle="{$banner['poptitle']}"
                                                subtitle="{$banner['auxtitle']}"
                                                btn="{$banner['buttontxt']}"
                                                remark="{$banner['remark']}"
                                        >
                                    </a>
                                </div>
                            {else if $banner['skip'] == 0}
                                <div class="swiper-slide">
                                    <a href="{if empty($banner['url'])}javascript:;{else}{$banner['url']}{/if}">
                                        <img src="{$banner['cover']}">
                                    </a>
                                </div>
                            {/if}
                        {/loop}
                    {else}
                        <div class="swiper-wrapper">
                            <div class="swiper-slide">
                                <a target="_blank" href="javascript:;">
                                    <img src="{HOME_THEME_PATH}../gw/img/public-class-banner-01_2.jpg" alt="">
                                </a>
                            </div>
                        </div>
                    {/if}
                </div>
                <div class="pagination homeBanner-pagination"></div>
            </div>
        </div>
        <!--  -->
        <div class="part part2">
            <div class="part-cont">
                <div class="part-tab">
                    <form name="search" action="index.php?s=user&c=publicClass" type="get">
                        <select class="select-item" name="grade">
                            <option value="">年级</option>
                            {loop $stages $key $vals}
                                 <option value="{$vals}" {if $vals == $grade}selected{/if}>{$vals}</option>
                            {/loop}
                        </select>
                        <select class="select-item" name="subject">
                            <option value="">科目</option>
                            {loop $subjects $k $sub}
                                <option value="{$sub}" {if $sub == $subject}selected{/if}>{$sub}</option>
                            {/loop}
                        </select>
                        <select class="select-item" name="status">
                            <!--<option value="">状态</option>-->
                            <!--<option value="预约">预约</option>-->
                            <!--<option value="直播中">直播中</option>-->
                            <option value="录播课程">录播课程</option>
                        </select>
                        <div class="search-box">
                            <div class="input-data">
                                <input type="hidden" name="s" value="user">
                                <input type="hidden" name="c" value="publicClass">
                                <input type="text" name="keywords" id="keywords" class="search" placeholder="请输入关键词">

                            </div>
                            <input class="input-word" type="submit" value="搜索">
                            <!--<a class="input-word">搜寻</a>-->
                        </div>
                    </form>
                </div>
                <div class="part-tab-content">
                    <div class="post">
                        {if count($classes)>0}
                            {loop $classes $class}
                        <div class="post-list">
                            <div class="post-data">
                                <div class="post-head">
                                    <div class="post-img">
                                        <div class="play-bottom" >
                                             <img src="{HOME_THEME_PATH}../gw/img/play-movie.png" onclick="poup_movie('');poup_url('{$class['videos']['videoid']}','{$class['videos']['playauth']}','{$class['cover']}')">
                                        </div>
                                        <img src="{if $class['cover']}{$class['cover']}{else}{HOME_THEME_PATH}../gw/img/teacher-demo-pic-04.png{/if}" alt="" >
                                    </div>
                                    <div class="post-title">
                                            <div class="post-main-title">{mb_substr($class['title'],0,11)}</div>
                                            <div class="post-sub-title">{$class['name']} / {$class['grade']}{$class['subject']}</div>

                                            <div class="post-movie-brn-box">
                                                <div class="post-movie-brn" onclick="poup_movie('');poup_url("{$class['videos']['videoid']}","{$class['videos']['playauth']}",'{$class['cover']}')">看回放</div>
                                            </div>
                                    </div>
                                </div>
                                 <div class="post-foot">
                                        <div class="post-word">
                                        <!-- <div class="post-read-more">更多</div> -->
                                            <div class="post-abbreviation">{mb_substr($class['aux_title'],0,11)}</div>
                                            <div class="post-allcontent">
                                                <div class="post-title">
                                                <div class="post-main-title">{$class['title']}</div>
                                                <div class="post-sub-title">{$class['name']} / {$class['grade']}{$class['subject']}</div>
                                                <hr/>
                                            </div>
                                            <div class="post-content-word">
                                                <p>{$class['content']}</p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="post-close"></div>
                        </div>
                        {/loop}
                        {/if}


                    </div>
                </div>

            </div>
        <div id="pages"><a>{fc_lang('共%s条', $total)}</a>{$pages}</div>
        </div>



        <div class="pouo-movie">
            <div  class="prism-player" id="J_prismPlayer"></div>
            <!-- <iframe src=""></iframe> -->
            <div class="loading"></div>
            <div class='close-form' onclick='close_movie();'></div>
        </div>
        <!-- 页尾 -->
        {template "../gw/footer.html"}
    </div>
    <!-- 网站跳出视窗＆表格确认 -->
    <script>
        function poup_url(videoid,playauth,cover){

            var player = new Aliplayer({
                id: 'J_prismPlayer',
                width: '100%',
                autoplay: false,
                //支持播放地址播放,此播放优先级最高
                // source : '播放url',
                //播放方式二：点播用户推荐
                vid : videoid,
                playauth : playauth,
                cover: cover,
                // //播放方式三：仅MPS用户使用
                // vid : '1e067a2831b641db90d570b6480fbc40',
                // accId: '',
                // accSecret: '',
                // stsToken: '',
                // domainRegion: '',
                // authInfo: '',
                // //播放方式四：使用STS方式播放
                // vid : '1e067a2831b641db90d570b6480fbc40',
                // accessKeyId: '',
                // securityToken: '',
                // accessKeySecret: ''
            },function(player){
                console.log('播放器创建好了。')
            });
        }
        function poup_movie(url){
            $(".pouo-movie").fadeIn("slow");
            $(".pouo-movie .close-form").delay(1000).fadeIn("slow");
        }
        function close_movie(){
            $(".pouo-movie").fadeOut("slow");
            $(".pouo-movie .close-form").fadeOut("slow");
            top.location.reload();
        }
    </script>
    <!-- 网站跳出视窗＆表格确认 end-->
    </body>
    <script src="{HOME_THEME_PATH}../gw/js/jquery.min.js"></script>
    <script src="{HOME_THEME_PATH}../gw/js/idangerous.swiper.min.js?t={time()}"></script>
    <script src="{HOME_THEME_PATH}../gw/js/custom.js?t={time()}"></script>

    <script>
        $(function(){
            $("select[name='grade']").change(function () {
               var grade = $(this).val();
               var subject = $("select[name='subject']").val();
                window.location.href = "index.php?s=user&c=publicClass&m=index&grade="+grade+"&subject="+subject;
            });
            $("select[name='subject']").change(function () {
                var subject = $(this).val();
                var grade = $("select[name='grade']").val();
                window.location.href = "index.php?s=user&c=publicClass&m=index&grade="+grade+"&subject="+subject;
            });
        });
    </script>

    <script src="{HOME_THEME_PATH}../gw/js/account_poupbox.js?t={time()}"></script>
    <link rel="stylesheet" href="{HOME_THEME_PATH}../gw/css/account_poupbox.css?t={time()}"/>
</html>
